/*
 * PhysicsList.cc
 *
 *  Created on: 13.02.2011
 *      Author: ed
 */

#include "PhysicsList.hh"

#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"


#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"

#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"



PhysicsList::PhysicsList():G4VUserPhysicsList(){;}


PhysicsList::~PhysicsList()
{
}
void PhysicsList::ConstructParticle()
{
	G4OpticalPhoton::OpticalPhotonDefinition();
}
void PhysicsList::SetCuts()
{
	this->SetCutsWithDefault();
}
void PhysicsList::SetVerboseLevel(G4int verboseLevel)
{

	absProc->SetVerboseLevel(verboseLevel);
	scaterProc->SetVerboseLevel(verboseLevel);
	boundProc->SetVerboseLevel(verboseLevel);
}
void PhysicsList::ConstructProcess()
{

	absProc = new G4OpAbsorption("OpAbsorption");
	scaterProc = new G4OpRayleigh("OpRayleigh");
	boundProc = new G4OpBoundaryProcess("OpBoundary");
	boundProc->SetModel(unified);
	SetVerboseLevel(0);
	AddTransportation();

	G4ParticleDefinition* particle = G4OpticalPhoton::OpticalPhotonDefinition();
	G4ProcessManager *pmanager =  particle->GetProcessManager();
	pmanager->AddDiscreteProcess(absProc);
	pmanager->AddDiscreteProcess(scaterProc);
	pmanager->AddDiscreteProcess(boundProc);
}
